<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="${ param.errorcode }" var="errorcode"></c:set>
<c:if test="${ not empty errorcode and errorcode eq 1 }">
	<script>alert("用户名或密码错误");</script>
</c:if>
<c:if test="${ not empty errorcode and errorcode eq 2 }">
	<script>alert("用户名不存在");</script>
</c:if>
<c:if test="${ not empty errorcode and errorcode eq 4 }">
	<script>alert("用户未登录，请重新登录");</script>
</c:if>
<%
	String errorCode = request.getParameter("errorCode");
	if(errorCode != null && errorCode.equals("4")) {
		out.println("<script>alert('用户未登陆，请重新登陆')</script>");
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户登录</title>
<style type="text/css">
body,td,th {
	font-size: 14px;
}
body {
	margin-left: 0px;
	margin-top: 100px;
	margin-right: 0px;
	margin-bottom: 0px;
}

table {
	border-left:1px #06F solid;
	border-top:1px #06F solid;
}
td {
	border-right:1px #06F solid;
	border-bottom:1px #06F solid;
	padding:5px 5px;
}
input {
	border:1px #999 dashed;
}
</style>
<script type="text/javascript" src="script/LoginFormCheck.js"></script>
</head>

<body>
<form id="form" name="form" method="post" onsubmit="return LoginFormCheck();" action="indexProcess">
  <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="2" align="center" style="background-color:#939"><h3>用户登录</h3></td>
    </tr>
    <tr>
      <td align="right">用户名：</td>
      <td align="left"><input type="text" name="username" id="username"></td>
    </tr>
    <tr>
      <td align="right">密码：</td>
      <td align="left"><input type="password" name="password" id="password"></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="checkbox" name="flag" id="flag">
        一个月免登陆</td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="登 录">
      <a href="reg.jsp">新用户注册</a></td>
    </tr>
  </table>
</form>
</body>
</html>
